package TeatCase;

import android.support.test.runner.AndroidJUnit4;
import android.util.Log;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

import QunarTest.QuanrTestCase;

import static HomeElements.Action.*;
import static HomeElements.AssertElementsContent.*;
import static org.junit.Assert.*;
/**
 * Created by zhe.xiao on 2017/6/29.
 */

public class TestReMenMu extends QuanrTestCase{

    /**
     * 测试热门目的地更多跳转
     */
    @Test
    public void testReMenMuMore(){
        clickReMenMuMore();
        boolean t = reMenMuMoreDes();
        Log.v("UIAUTOMATOR", "testReMenMuMore: " + t);
        assertTrue(t);
    }

    /**
     * 热门目的地第一个跳转
     */
    @Test
    public void testReMeMu1(){
        swipeReMenMu();
        String city1 = reMenMuCity1Des();
        Log.v("UIAUTOMATOR", "testReMeMu1: " + city1);
        clickReMenMu1();
        String city2 = reMenMuDes();
        Log.v("UIAUTOMATOR", "testReMeMu1: " + city2);
        assertEquals(city1, city2);
    }

    /**
     * 热门目的地第二个跳转
     */
    @Test
    public void testReMeMu2(){
        swipeReMenMu();
        String city1 = reMenMuCity2Des();
        Log.v("UIAUTOMATOR", "testReMeMu2: " + city1);
        clickReMenMu2();
        String city2 = reMenMuDes();
        Log.v("UIAUTOMATOR", "testReMeMu2: " + city2);
        assertEquals(city1, city2);
    }

    /**
     * 热门目的地第三个跳转
     */
    @Test
    public void testReMeMu3(){
        swipeReMenMu();
        String city1 = reMenMuCity3Des();
        Log.v("UIAUTOMATOR", "testReMeMu3: " + city1);
        clickReMenMu3();
        String city2 = reMenMuDes();
        Log.v("UIAUTOMATOR", "testReMeMu3: " + city2);
        assertEquals(city1, city2);
    }
}
